#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
    int A, N, sum = 0;
    cin >> A;
    while (cin >> N, N <= 0);
    for (int i = 0; i < N; i++)
    {
        sum += A++;
    }
    cout << sum;
    return 0;
}